<?phpnamespace Admin\Controller;use Admin\Controller;class ArticleAttrController extends RootController{	/**	 * 编辑单个ArticleAttr	 */	public function edit(){		if(IS_POST){		    //dd($_POST);			$res = M('ArticleAttr')->data($_POST)->save();			if(false !== $res){				$this->redirect('ArticleCate/edit',array('id' =>$_GET['cateid'],'on'=>1));			}else{				$this->error('编辑出错！');			}		}else{			$where['id']=$_GET['id'];			$res=M('ArticleAttr')->where($where)->find();			$this->assign('page',$res);			$this->display();		}	}	public function delete(){		$res = M('ArticleAttr')->where(array('id'=>$_GET['id']))->delete();		if($res){			$this->redirect('ArticleCate/edit',array('id' =>$_GET['cateid'],'on'=>1));		}else{			$this->error('删除出错！');		}	}}